<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>电商数据可视化面板</title>
    <script src="echarts.min.js"></script>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css" integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">
</head>
<body style="background-color: #000066;color: white;">
    <div class="container">
        <div class="row">
            <div class="text-center col-12"><h3>今日订单总金额</h3></div>
            <div class="text-center col-12"><h2>4509834</h2></div>
        </div>

        <div class="row">
            <div class="col-3 ">
                <div class="text-center">今日成交订单数</div>
                <div class="text-center">34220</div>
            </div>
            <div class="col-3 offset-1">
                <div class="text-center">订单成功占比</div> 
                <div class="text-center">93.25%</div>
            </div>
            
            <div class="col-3 offset-1">
                <div class="text-center">订单取消订单数</div> 
                <div class="text-center">2310</div>
            </div>
        </div>

        <div class="row">
            <div class="card col-3" style="height: 500px;" >
                <div class="card-body">
                  <h5 class="card-title">购买用户设备分布图</h5>
                    <div id="pie_dev" style="width: 500px;height: 500px;"></div>
                </div>
              </div>

        </div>
    </div>
</body>
<script>
    let pie_dev=echarts.init(document.getElementById("pie_dev"))
    let option_pie_dev ={
        title:{
            text:"购买用户设备分布图"
        },
        series:[
            {
                type:'pie',
                radius:["15%","20%"],
                label:{
                    normal:{formatter:"{b}:\n{c}({d}%)"}
                },
                center:["20%","45%"],
                data:[
                    {value:1032,name:'mac'},
                    {value:10096,name:'iphone'},
                    {value:1240,name:"iPad"},
                    {value:15098,name:"Android"},
                    {value:4098,name:'Windows'},
                    {value:2656,name:"其他"}
                ]
            }
        ]
    }
    pie_dev.setOption(option_pie_dev)
</script>

</html>